1. Field of the Invention
The present invention is related to databases. More particularly, the present invention is related to a system and method for storing ad-hoc information within a single database table without compromising the disparity and type of information provided by the user.
2. Description of the Related Art
The advent of the Internet, particularly the World Wide Web (“WWW”), heralded the advent of ubiquitous technologies that link people and information. With the proliferation of dynamically generated hypertext markup language (“HTML”) by application servers and other web technologies, many types of user interaction problems, such as those encountered with traditional client-server applications, were solved.
Many web-based software applications utilize a web server in conjunction with a relational database and intermediate software (“middleware”) that retrieves the information from the database and places it into a form needed by the web server to generate the response to the user. Users typically access the web-based application by entering a universal resource locator (“URL”) into their web browser, and send the request to the web server. The web server satisfies the request in one of two general ways: return a static web page; or generate a dynamic web page. Dynamic page generation typically requires access to a relational database. The relational database contains information that is stored in one or more fields (columns) about specific instances (rows) within a table. One or more rows are typically retrieved in a database request that is issued by the web server. The information from the database's response is used to generate the dynamic web page. Consequently, most moderate and large web applications can be broken down into three fundamental components:                1. The view and its support utilities, i.e. the front-end or user-interface, is typically a set of web pages generated by JavaServer Pages (“JSP's”), common gateway interface (“CGI”) code or Application Server Pages (“ASP's”) that are presented to the client or other applications by a suitable server that is a consumer of middleware functionality. Java Server Pages technology can be obtained from Sun Microsystems of Santa Clara, Calif. Application Server Page technology is available from the Microsoft Corporation of Redmond, Wash.        2. Middleware is the application code that encapsulates the systems business logic. Middleware is also responsible for persisting and retrieving data from a persistence store.        3. A persistence layer is responsible for long-term storage of application and user data. Typically the persistence layer consists of a database but could also be as simple as a file system.        
In the case of a presenting a series of new questions via a web application using a database and typical middleware, the database developer must create table space to capture the answers for each question. Table space creation could have been as simple as modifying existing tables to accept extra fields, or as complicated as creating new tables and integrating them into the existing schema's integrity constraints. For the middleware, the system architect and the developer must design and implement components that enforce business logic for the new types of data. Furthermore, new methods must be exposed to the view and the new components must be integrated into the persistence process.
While changes to web-based applications are easier to implement than client-server applications, web-based content for software applications is still typically hard coded and therefore requires complete rewrites of the front end (user-interface) when significant changes are made to the middleware and database. Similarly, even minor changes to the type of information gathered via the user-interface can require significant modification of database schema used to support the web-based user-interface. Such modifications are expensive, both in terms of money and in time. Modifications are expensive because once the structure (schema) of the database is set, it is difficult to modify without causing significant “ripple” effects in both the middleware and the user interface and vise-versa.
The Extensible Markup Language (“XML”) is a processing standard proposed by the World Wide Web Consortium (“W3C”), the same group responsible for overseeing the HTML standard. XML is expected to replace HTML as the markup language of choice for dynamically generated content, including non-static web pages. XML is a meta-language that enables the creation and formatting of arbitrary document markups called elements. Each of the elements can be defined through a document type definition and/or a stylesheet and applied to one or more XML documents. Elements within XML can contain other elements. Elements that are embedded within other elements can be described in a hierarchical manner (i.e., parent-child relationships between elements). XML documents are typically stored on a standard file system.
In the prior art, which is exemplified by the book “Professional XML Databases” by Kevin Williams, et al (Wrox, December 2000), the hierarchical structure of elements within an XML document do not lend themselves to storage within a relational database. Proper administration of relational databases require the “normalization” of the information, and the sequestering of unique types of information into specific columns within the database tables. For example, a field could contain a person's last name, and such a field may be called “last_name.” It would be improper to place the person's first name within the last_name field because it would diminish the value of the database if the end-users of the database had to consider or filter first names from the last name field. Consequently, when a different type of information is needed, a new field within one of the database tables must be created, and that field must be linked to the user interface with changes to the middleware and/or user-interface. Such changes are, as mentioned above, expensive both in terms of time and in terms of out-of-pocket expenses. There is, therefore, a need in the art for a system and method that enables a web-based (or other) user-interface to be modified to accommodate new or ad-hoc information without requiring modification to the middleware or to the database tables or to the underlying database schema.